<include file="Public/header" />
<include file="Public/menu" />

<!-- 内容页 -->
<div class="content-wrapper">
    <!-- 面包屑 -->
    <section class="content-header">
        <h1>
            店铺配置
            <small>管理</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> 店铺配置</a></li>
            <li class="active">添加发货信息</li>
        </ol>
    </section>

    <!-- 内容 -->
    <section class="content"><div class="row"><div class="col-md-12">
        <div class="box box-info">
            <div class="box-header with-border">
                <h3 class="box-title">发货信息</h3>

                <div class="box-tools">

                    <div class="btn-group pull-right" style="margin-right: 10px">
                        <a href="{:U('/Qgs/Delivery/deliveryInfo')}" class="btn btn-sm btn-default"><i class="fa fa-list"></i>&nbsp店铺发货信息列表</a>
                    </div>
                </div>
            </div>
            <!-- /.box-header -->
            <!-- form start -->
            <form action="{:U('/Qgs/Delivery/deliveryInfoAdd')}" method="post" accept-charset="UTF-8" class="form-horizontal" id="infAddForm">

                <input type="hidden" name="dly_center_id" value="{$info['dly_center_id']}">
                <div class="box-body">
                    <div class="form-group 1">
                            <label class="col-sm-2 control-label">发货点名称</label>
                        <div class="col-sm-6">
                            <div class="input-group">
                                <span class="input-group-addon"><i class="fa fa-pencil"></i></span>
                                <input type="test" name="name" value="{$info['name']}" class="form-control" placeholder="发货点名称">
                            </div>
                        </div>
                    </div>
                    <div class="form-group 1">
                        <label class="col-sm-2 control-label">发货人姓名</label>
                        <div class="col-sm-6">
                            <div class="input-group">
                                <span class="input-group-addon"><i class="fa fa-pencil"></i></span>
                                <input type="text" name="uname" value="{$info['uname']}" class="form-control" placeholder="发货人姓名">
                            </div>
                        </div>
                    </div>
                    <div class="form-group 1">
                        <label class="col-sm-2 control-label">地区</label>
                        <div class="col-sm-6">
                            <div class="input-group">
                                <span class="input-group-addon"><i class="fa fa-pencil"></i></span>
                                <input type="text" name="region" value="{$info['region']}" class="form-control" placeholder="地区">
                            </div>
                        </div>
                    </div>
                    <div class="form-group 1">
                        <label class="col-sm-2 control-label">详细地址</label>
                        <div class="col-sm-6">
                            <div class="input-group">
                                <span class="input-group-addon"><i class="fa fa-pencil"></i></span>
                                <input type="text" name="address" value="{$info['address']}" class="form-control" placeholder="详细地址">
                            </div>
                        </div>
                    </div>

                    <div class="form-group 1">
                        <label class="col-sm-2 control-label">手机</label>
                        <div class="col-sm-6">
                            <div class="input-group">
                                <span class="input-group-addon"><i class="fa fa-pencil"></i></span>
                                <input type="text" name="cellphone"  value="{$info['cellphone']}" class="form-control" placeholder="手机">
                            </div>
                        </div>
                    </div>
                    <div class="form-group 1">
                        <label class="col-sm-2 control-label">性别</label>
                        <div class="col-sm-6">
                            <div class="input-group" style="margin-top: 6px;">
                                先生 <input type="radio"  name="sex" value="male" <if condition="$info['sex'] eq 'male'">checked="checked"</if> class="">
                                女士 <input type="radio" name="sex" value="female" <if condition="$info['sex'] eq 'female'">checked="checked"</if> >
                            </div>
                        </div>
                    </div>

                    <div class="form-group 1">
                        <label class="col-sm-2 control-label">设置</label>
                        <div class="col-sm-6">
                            <div class="input-group" style="margin-top: 6px;">
  <input type="checkbox" name="disabled" <if condition="$info['disabled'] eq 'true'">checked</if> class="inputstyle" id="is_default_dc" >设置为默认地址
                            </div>
                        </div>
                    </div>



                    <div class="form-group 1">
                        <label class="col-sm-2 control-label">邮编</label>
                        <div class="col-sm-6">
                            <div class="input-group">
                                <span class="input-group-addon"><i class="fa fa-pencil"></i></span>
                                <input type="text" name="zip" value="{$info['zip']}" class="form-control" placeholder="邮编">
                            </div>
                        </div>
                    </div>


                    <div class="form-group 1">
                        <label class="col-sm-2 control-label">电话</label>
                        <div class="col-sm-6">
                            <div class="input-group">
                                <span class="input-group-addon"><i class="fa fa-pencil"></i></span>
                                <input type="text" name="phone" value="{$info['phone']}" class="form-control" placeholder="电话">
                            </div>
                        </div>
                    </div>
                    <div class="form-group 1">
                        <label class="col-sm-2 control-label">备注</label>
                        <div class="col-sm-6">
                            <div class="input-group">
                                <span class="input-group-addon"><i class="fa fa-pencil"></i></span>
                                <textarea name="memo" class="form-control" placeholder="备注">{$info['memo']}</textarea>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- /.box-body -->
                <div class="box-footer">
                    <div class="col-sm-2">

                    </div>
                    <div class="col-sm-6">

                        <div class="btn-group pull-right">
                            <input type="reset" class="btn btn-warning" value="重置">
                        </div>

                        <div class="btn-group pull-left">
                            <button type="submit" class="btn btn-info pull-right">提交</button>
                        </div>


                    </div>

                </div>
                <!-- /.box-footer -->
            </form>
        </div>

    </div></div>

    </section>
</div>
<!-- 底部 -->
<include file="Public/common_footer" />


<script>

    $("#infAddForm").validate({
        rules: {
            name:{
                required: true,
                maxlength: 200
            },
            uname:{
                maxlength: 100
            },
            region:{
                required: true,
                maxlength: 200
            },
            address:{
                required: true,
                maxlength: 200
            },
            cellphone:{
                isMobile: true
            },
            zip: {
                isZipCode: true
            },
            phone:{
                isPhone: true
            },
            memo:{
                maxlength: 1000
            }
        },
        messages:{
            name:{
                required: "请输入发货点名称",
                maxlength: "收货人姓名不能超过200个字符"
            },
            uname:{
                required: "发货人姓名不能超过100个字符"
            },
            region:{
                required: "请输入地区（省市区）",
                maxlength: "地区不能超过100个字符"
            },
            address:{
                required: "请输入详细地址",
                maxlength: "地区不能超过100个字符"
            },
            memo:{
                maxlength: "备注不能超过1000个字符"
            },

        },
        submitHandler: function(form){
             form.submit();   //提交表单
        }
    });

</script>



